<template>
    <div class="container">
        <!-- 积分明细 -->
        <BackBtn />
        <div class="header">
            <div class="header-top">
                <div class="integral">
                    <div class="num">520</div>
                    <div class="text">可用积分</div>
                </div>
                <div class="rule" @click="$router.push('/integralshop/rule')">规则<span
                        class="iconfont icon-youjiantou"></span></div>
            </div>
            <div class="tips"><van-icon name="like-o" size="20" />相爱的人总会和好</div>
        </div>
        <div class="record-container">
            <div class="title">积分记录</div>
            <ul class="record-list">
                <li v-for="(item,index) in recordList" :key="index">
                    <div class="record-left">
                        <div class="record-title">{{ item.title }}</div>
                        <div class="time">{{ item.time }}</div>
                    </div>
                    <div class="num">{{ item.num }}</div>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
import recordList from './record';
export default {
    data() {
        return {
            recordList: recordList
        }
    }
}
</script>

<style>
.van-icon-like-o {
    margin-right: 3px;
}
</style>

<style lang="less" scoped>
.container {
    padding: 10px;
}

.header {
    .tips {
        width: 90%;
        margin: 20px auto;
        padding: 13px 15px;
        background-color: #e2e2e2;
        color: #666666;
        border-radius: 10px;
    }
}

.header-top {
    height: 90px;
    padding: 50px 0 0 0;
    box-sizing: border-box;
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    .integral {
        display: flex;
        align-items: baseline;
        color: #143b9c;

        .num {
            font-size: 40px;
            font-weight: bold;
        }

        .text {
            font-size: 16px;
            font-weight: bold;
            margin-left: 10px;
        }
    }

    .rule {
        color: #666666;
        font-size: 15px;
    }
}

.record-container {
    width: 90%;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px 15px;
    border-radius: 10px;

    .title {
        font-size: 18px;
        font-weight: 500;
        border-bottom: 1px solid #e8e7e7;
        padding-bottom: 10px;
    }
    .record-list {
        li {
            background-color: #fff;
            height: 80px;
            border-bottom: 1px solid #e8e7e7;
            display: flex;
            justify-content: space-between;
            align-items: center;
            .record-left {
                display: flex;
                flex-direction: column;
                justify-content: space-around;
                height: 100%;
                padding: 15px 0;
                box-sizing: border-box;
                .record-title {
                    font-size: 15px;
                }
                .time {
                    font-size: 13px;
                    color: #999;
                }
            }
            .num {
                font-size: 20px;
                color: #143b9c;
            }
        }
    }
}
</style>